﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Types
{
    [Serializable]
    public enum RequestId
    {
        Login, Logout, ServerClosed, Subscribe, GetCourseList, GetQuestionList,
        AddQuestion, DeleteQuestion, GetQuestionId, AddAnswer, GetMyQuestions,
        GetAnswerList, UpdateUserList, Search, GetFileContent, GetCourseName,
        GetQuestionSummary
    };

    [Serializable]
    public class Request
    {
        public RequestId requestType { get; private set; }
        public bool operationResult { get; set; }
        public object objectType { get; set; }

        public Request(RequestId requestType, object objectType)
            : this(requestType, false, objectType)
        { }

        public Request(RequestId requestType, bool operationResult, object objectType)
        {
            this.requestType = requestType;
            this.operationResult = operationResult;
            this.objectType = objectType;
        }


    }
}
